<template>
  <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
    <el-form ref="form" :model="row" label-width="80px">
      <el-form-item label="字段描述" prop="columnComment">
        <el-input v-model="row.columnComment"/>
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="closeDialog">关 闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      // 是否显示弹出层
      open: false,
      // 对话框标题
      title: '',
      // 字段数据
      row: {}
    };
  },
  methods: {
    /**
     * 显示对话框
     */
    showDialog(row) {
      this.open = true;
      this.row = row;
      this.title = "字段 " + row.columnName;
    },
    /**
     * 关闭对话框
     */
    closeDialog() {
      this.open = false;
    }
  }
};
</script>
